#ifndef VENUS_RAY_MARCHING_RAY_MARCHING_DEMO_H
#define VENUS_RAY_MARCHING_RAY_MARCHING_DEMO_H

#include "ui/glut_window.h"
#include "graphics/camera.h"
#include "fluid_system.h"
#include "volume_renderer.h"
#include "graphics/fps_counter.h"

namespace venus {
class RayMarchingDemo : public GlutWindow {
public:
  RayMarchingDemo() 
      : GlutWindow("Ray Marching Demo",10, 10, 800, 600, 
                   GLUT_RGBA|GLUT_DOUBLE),
        cg_context_(NULL), fluid_system_(NULL), volume_renderer(NULL),
        camera_(Point(-5, -5, -5)), fps_counter_(FpsCounter::kOverTime, 0.3) {
    camera_.set_velocity(0, 0, 0.5);
  }
  ~RayMarchingDemo() { }
  bool Initialize();
  void OnIdle();
  void OnDisplay();
  void OnResize(int width, int height);
  void OnKeyboard(unsigned char key, int x, int y);
private:
enum UIOption {
  OPTION_DRAW_CUBE,
  OPTION_SIMULATE,
  OPTION_AUTO_SEED,
  OPTION_COUNT
};
private:
  OrbitPerspectiveCameraGL camera_;
  CGcontext cg_context_;
  FluidSystem *fluid_system_;
  VolumeRenderer *volume_renderer;
  bool options_[OPTION_COUNT];
  FpsCounter fps_counter_;
};
} // namespace venus

#endif // VENUS_RAY_MARCHING_RAY_MARCHING_DEMO_H
